<?
session_start();
include 'functions.php';

$back = 0;

	
if(isset($_POST['email']) && isset($_POST['password'])){
	$email = mysql_real_escape_string($_POST['email']);
	$password = mysql_real_escape_string($_POST['password']);
	$back = checkUser($email, $password, 0);
}

if ($back == 1){
	$output = json_encode(array("status"=>"success", "message"=>"ok"));
}else{
	$output = json_encode(array("status"=>"error", "message"=>"nok"));
}

echo $output; 

?>